import request from '@/utils/request'

const BASE_URL = '/admin/system/sysComplaint';

export default {
    findPageInfo(page, limit, searchObj) {
        return request({
            url: `${BASE_URL}/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },


    addComplaint(sysComplaint) {
        return request({
            url: `${BASE_URL}/addComplaint`,
            method: 'post',
            data: sysComplaint
        })
    },

    findComplaintById(id) {
        return request({
            url: `${BASE_URL}/findComplaintById/${id}`,
            method: 'get',

        })
    },

    updateComplaint(sysComplaint) {
        return request({
            url: `${BASE_URL}/updateComplaint`,
            method: 'post',
            data: sysComplaint
        })
    },

    removeById(id) {
        return request({
            url: `${BASE_URL}/removeComplaintById/${id}`,
            method: 'delete',

        })
    },
    //  7、批量删除
    batchremoveId(ids) {
        return request({
            url: `${BASE_URL}/removeComplaintByIds`,
            method: 'delete',  // 提交方式
            data: ids
        })
    },
}